package org.surelink.radius.constant;


import java.util.ArrayList;
import java.util.List;

public class Constant
{


    public static final StringConst USER_EXPIRE = new StringConst("EXPIRE","过期时间(####-##-##)");
    public static final StringConst USER_CREDIT = new StringConst("CREDIT","用户余额（分）");
    public static final StringConst USER_PERIOD = new StringConst("PERIOD","上网时段(比如 08:00-21:00)");
    public static final StringConst USER_BIND_MAC = new StringConst("BIND_MAC","绑定MAC地址(0/1:不绑定/绑定)");
    public static final StringConst USER_BIND_VLAN = new StringConst("BIND_VLAN","绑定VLAN(0/1:不绑定/绑定)");
    public static final StringConst USER_CONCUR_NUMBER  = new StringConst("CONCUR_NUMBER","并发数（0-20）");
    public static final StringConst USER_MAC_ADDR = new StringConst("MAC_ADDR","MAC地址");
    public static final StringConst USER_VLAN1 = new StringConst("VLAN1","VLAN1");
    public static final StringConst USER_VLAN2 = new StringConst("VLAN2","VLAN2");
    
    
    public static final StringConst GROUP_FEE_POLICY = new StringConst("FEE_POLICY","资费(1/2:预付费计时/预付费包月)");
    public static final StringConst GROUP_FEE_PRICE = new StringConst("FEE_PRICE","资费价格(分)，每小时/每月)");
    public static final StringConst GROUP_PERIOD = new StringConst("PERIOD","上网时段（比如 08:00-21:00）"); 
    public static final StringConst GROUP_CLIENT = new StringConst("CLIENT","绑定客户端"); 
    public static final StringConst GROUP_BIND_MAC = new StringConst("BIND_MAC","绑定MAC地址(0/1:不绑定/绑定)");
    public static final StringConst GROUP_BIND_VLAN = new StringConst("BIND_VLAN","绑定VLAN(0/1:不绑定/绑定)");
    public static final StringConst GROUP_CONCUR_NUMBER  = new StringConst("CONCUR_NUMBER","并发数（0-20）");
    public static final StringConst GROUP_DEFAULT_SESSIONTIME  = new StringConst("SESSION_TIMEOUT","最大会话时长（秒）");

    
    public final static List<StringConst> UserMetaList = new ArrayList<StringConst>();
    public final static List<StringConst> GroupMetaList = new ArrayList<StringConst>();

    static
    {
        UserMetaList.add(USER_EXPIRE);
        UserMetaList.add(USER_CREDIT);
        UserMetaList.add(USER_PERIOD);
        UserMetaList.add(USER_BIND_MAC);
        UserMetaList.add(USER_BIND_VLAN);
        UserMetaList.add(USER_MAC_ADDR);
        UserMetaList.add(USER_CONCUR_NUMBER);
        UserMetaList.add(USER_VLAN1);
        UserMetaList.add(USER_VLAN2);


        GroupMetaList.add(GROUP_FEE_POLICY);
        GroupMetaList.add(GROUP_FEE_PRICE);
        GroupMetaList.add(GROUP_PERIOD);
        GroupMetaList.add(GROUP_CLIENT);
        GroupMetaList.add(GROUP_BIND_MAC);
        GroupMetaList.add(GROUP_BIND_VLAN);
        GroupMetaList.add(GROUP_CONCUR_NUMBER);
        GroupMetaList.add(GROUP_DEFAULT_SESSIONTIME);
    }
    

//    public static String getGroupMetaDesc(String name)
//    {
//        for (StringConst meta : GroupMetaList)
//        {
//            if(meta.value().equals(name))
//                return meta.desc();
//        }
//        return "Radius扩展属性";
//    }
//
//    public static String getUserMetaDesc(String name)
//    {
//        for (StringConst meta : UserMetaList)
//        {
//            if(meta.value().equals(name))
//                return meta.desc();
//        }
//        return "Radius扩展属性";
//    }
    
}
